import Taro, { Component } from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
import './chooseconsultation.css'
import { AtRadio,AtButton,AtList, AtListItem}  from 'taro-ui'
import {$redirectTo,getGlobalData} from '../../../global'
export default class ChooseConsultation extends Component {

  config = {
    navigationBarTitleText: '选择患者'
  }
  constructor () {
    super(...arguments)
    this.state = {
      value: ''
    }
  }
  handleChange (value) {
    this.setState({
      value
    })
  }
  xinjian=()=>{
    $navigateTo("../jiangkangdangan/index")
  }
  wenti=()=>{
    app.redirectTo("../symptomtime.1/symptomtime")
  }
  componentWillMount () { }

  componentDidMount () { }

  componentWillUnmount () { }

  componentDidShow () { }

  componentDidHide () { }

  render () {
    return (
      <View className='choose-consultation'>
          <View className='title'>请选择需要咨询的患者</View>
          <View className='tips'>错误的患者信息会误导医生，请慎重选择</View>
          <AtList >
        </AtList>
         <AtRadio
        options={[
          { label: '刘泫然 男 22岁', value: 'option1' },
          { label: '王若然 女 32岁', value: 'option2' },
          { label: '溪雾茳 女 18岁', value: 'option3'}
        ]}
        value={this.state.value}
        onClick={this.handleChange.bind(this)}
      />
         <AtListItem onClick={this.xinjian} title='新建患者' thumb={getGlobalData('baseurl')+'img/xinzeng.png'} arrow='right' hasBorder={false} />
          
        <View className='btn-box' onClick={this.wenti}><AtButton className='next-btn'>下一步</AtButton></View>
      </View>
    )
  }
}

